Validator block backup#2232
Conversation
| let genesis_block_path = genesis_block_directory.join(GENESIS_BLOCK_FILENAME); | ||
| fs_err::write(&genesis_block_path, block_bytes).context("failed to write genesis block")?; | ||
|
|
||
| let _ = BlockStore::bootstrap(data_directory.to_path_buf().join("blocks"), &genesis_block)?; |
There was a problem hiding this comment.
@Mirko-von-Leipzig I was wondering if we should use the store crate's DataDirectory struct for this but there is a discrepancy between the db filepaths atm (validator.sqlite3 vs miden-store.sqlite3).
There was a problem hiding this comment.
I have been wondering if we can't clean things up somehow.. At the moment its not quite an easy split, so maybe what you've got here is fine and we shouldn't force coupling between things that aren't literally the same thing.
We could mimic the struct here with the differences? Or create the struct with a configurable service name e.g. node and validator which would be used to infer the sqlite3 filestem?
But I think lets keep them separate 🤷 They want to store different things over time so maybe its best to keep them decoupled.
…-node into sergerad-validator-block-bkp
Stacked PR.
Relates to #2169.
Validator storing blocks via
run-node.sh: